1. Technical Field
The present invention is directed to a method and apparatus for managing data storage systems. More specifically, the present invention is directed to a method and apparatus for reducing the number of physical storage systems needed for a volume group to remain active.
2. Description of Related Art
Most computer systems are made up of at least one processor and one physical storage system. The processor processes, stores and retrieves data from the physical storage system under the guidance of an application program.
Application programs generally run atop an operating system. Among the many tasks of an operating system is that of allowing an application program to have a rather simplistic view of how data (i.e., data files) are stored within a physical storage system. Typically, an application program views the physical storage system as containing a number of hierarchical partitions (i.e., directories) within which entire data files are stored. This simplistic view is often referred to as a logical view since most files are not really stored as unit bodies into directories but rather are broken up into data blocks that may be strewn across the entire physical storage system.
The operating system is able to allow an application program to have this simplistic logical view with the help of a file management system. The file management system stores directory structures, breaks up data files into their constituent data blocks, stores the data blocks throughout a physical storage system and maintains data logs of where every piece of data is stored. Thus, the file management system is consulted whenever data files are being stored or retrieved from storage.
Computer systems that have a plurality of physical storage systems (e.g., servers) use an added layer of abstraction when storing and retrieving data. The added layer of abstraction is a logical volume manager (LVM). Volume, in this case, is the storage capacity of a physical storage system. Thus, volume and physical storage system will henceforth be used interchangeably.
The LVM arranges the physical storage systems into volume groups in order to give the impression that storage systems having each a much more voluminous storage capacity are being used. Within each volume group, one or more logical volumes may be defined. Data stored in a logical volume appears to be stored contiguously. However in actuality, the data may be interspersed into many different locations across all the physical storage systems that make up the volume group.
Stated differently, each logical volume in a logical volume group is divided into logical partitions. Likewise, each physical volume in a volume group is divided into physical partitions. Each logical partition corresponds to at least one physical partition. But, although the logical partitions in a logical volume are numbered consecutively or appear to be contiguous to each other, the physical partitions to which they each correspond, need not be contiguous to each other. And indeed, most often, the physical partitions are not contiguous to each other. Thus, one of the many tasks of the LVM is to keep tab on the location of each physical partition that corresponds to a logical partition.
For fault tolerance and performance, some servers store at least one extra copy of each piece of data onto the physical storage systems they use. Storing more than one copy of a piece of data is called mirroring the data. In order to store mirrored data, each logical partition used must correspond to as many physical partitions as there are mirrors (or copies) of the data. In other words, if the data is mirrored three times, for example, each logical partition has to correspond to three physical partitions.
In any case, when an attempt to write metadata into a physical storage system is not successful, the physical storage system is marked as unavailable. The present policy is that when half or more of the physical storage systems present in a volume group is marked unavailable, the volume group should not remain active. This policy is used to ensure that when a computer system is turned on or is reset if the majority of the physical storage systems in a volume group is available for use, the metadata in at least one of the physical storage systems will be valid. This allows this metadata to be copied into the other physical storage systems (i.e., allows the data in the physical storage system whose metadata is determined to be valid to be used).
Metadata is data about data. Metadata describes how and when and by whom a particular set of data was collected, and how the data is formatted etc. Thus, with the use of metadata it can be determined whether or not a piece of data stored in a physical storage system is stale. A piece of data is said to be stale if it has been updated and for some reason the update has not been stored in the physical storage system. More than half of the physical storage systems present in a computer system may be quite a large number.
What is needed, therefore, is an apparatus and method of reducing the number of physical storage systems needed for a volume group to remain active.
The present invention provides a method, system, apparatus and computer program product for reducing the number of physical storage systems needed for a volume group to remain active. This is accomplished by creating mirroring sets out of the physical storage systems in the volume group and by setting up a policy that so long as one mirror out of each mirror set is available, the volume group should be allowed to remain active. To activate a volume group (i.e., when the computer system is turned or reset), there have to be at least one full mirror set and at least one mirror out of each remaining mirror set available. These two policies guarantee that there will always be valid metadata in the system.